package cn.jy.finanlle.service.impl;



import cn.jy.common.domain.financea.ExpressAccount;
import cn.jy.common.domain.vo.ExpressAccountVo;
import cn.jy.finanlle.mapper.ExpressAccountMapper;
import cn.jy.finanlle.service.IExpressAccountService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * financeService业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-22
 */
@Service
public class ExpressAccountServiceImpl implements IExpressAccountService
{
    @Autowired
    private ExpressAccountMapper expressAccountMapper;

    /**
     * 查询finance
     * 
     * @param id finance主键
     * @return finance
     */
    @Override
    public ExpressAccount selectExpressAccountById(Long id)
    {
        return expressAccountMapper.selectExpressAccountById(id);
    }





    /**
     * 查询finance列表
     *
     * @param expressAccount finance
     * @return finance
     */
    @Override
    public PageInfo<ExpressAccount> selectExpressAccountList(ExpressAccountVo expressAccountVo)
    {
        PageHelper.startPage(expressAccountVo.getPageNum(),expressAccountVo.getPageSize());
        List<ExpressAccount> expressAccounts = expressAccountMapper.selectExpressAccountList(expressAccountVo);
        PageInfo<ExpressAccount> expressAccountPageInfo = new PageInfo<>(expressAccounts);

        return expressAccountPageInfo;
    }

    /**
     * 新增finance
     * 
     * @param expressAccount finance
     * @return 结果
     */
    @Override
    public int insertExpressAccount(ExpressAccount expressAccount)
    {
        return expressAccountMapper.insertExpressAccount(expressAccount);
    }

    /**
     * 修改finance
     * 
     * @param expressAccount finance
     * @return 结果
     */
    @Override
    public int updateExpressAccount(ExpressAccount expressAccount)
    {
        return expressAccountMapper.updateExpressAccount(expressAccount);
    }

    /**
     * 批量删除finance
     * 
     * @param ids 需要删除的finance主键
     * @return 结果
     */
    @Override
    public int deleteExpressAccountByIds(Long[] ids)
    {
        return expressAccountMapper.deleteExpressAccountByIds(ids);
    }

    /**
     * 删除finance信息
     * 
     * @param id finance主键
     * @return 结果
     */
    @Override
    public int deleteExpressAccountById(Long id)
    {
        return expressAccountMapper.deleteExpressAccountById(id);
    }
}
